package com.kun.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @Version:v1.0
 * @Author: 鲁坤
 * @Date: 2021-03-15
 * @ClassName: User
 * @Description: 用户类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    private int uid;
    private String username;
    private String password;
    private String email;
    private int rstatus;
    private int lstatus;
    private String photo;
    private int gender;
    private int age;
    private Timestamp logintime;
    private String address;

    public User(String username, String password, String email) {
        this.username = username;
        this.password = password;
        this.email = email;
    }
    public void SetTheRestInfo(int age,String address,String gender,String photo){
        this.age=age;
        this.address=address;
        if(gender.equals("男")){
            this.gender=1;
        }else{
            this.gender=0;
        }
        this.photo=photo;
    }
}
